Carbon monoxide and smoke detection apparatus

ABSTRACT

A smoke sensor and a carbon monoxide sensor are integrated into a common detector housing. The smoke sensor is coupled to a smoke detector control integrated circuit which generates a binary output signal indicative of the presence of smoke. This signal is coupled to a programmed microprocessor in the detector housing. The carbon monoxide sensor is also coupled to the microprocessor. Outputs from the two sensors are processed substantially independently. In the presence of smoke, the smoke alarm is generated by the microprocessor. In the presence of sufficient levels of carbon monoxide, in the absence of smoke, a carbon monoxide alarm will be generated.

RELATED APPLICATION

[0001] This is a continuation application of U.S. patent applicationSer. No. 09/058,467, filed Apr. 9, 1998, entitled “CARBON MONOXIDE ANDSMOKE DETECTION APPARATUS”, which claims priority from provisional U.S.patent application Serial No. 60/055,009, entitled “SMOKE AND GASDETECTORS,” filed Aug. 7, 1997, the subject matter and entire writingsof which are incorporated herein by reference.

FIELD OF THE INVENTION

[0002] The present invention relates generally to detecting a conditionin the environment. Particularly, the invention pertains to apparatusand methods to detect the presence of carbon monoxide and smoke in theatmosphere.

BACKGROUND

[0003] The threat of carbon monoxide poisoning has increaseddramatically in the past decade. Carbon monoxide is a colorless,odorless, tasteless gas, making it virtually impossible to detect itspresence. Carbon monoxide can be produced by various fuel burningappliances, such as, fuel fired furnaces, gas hot water heaters, gasstoves, gas dryers, space heaters, charcoal grills, fireplaces,vehicles, lawn mowers, or snow blowers. Once present, this gascirculates freely throughout a building, such as a home. If this gas isnot ventilated properly, carbon monoxide poisoning may result.

[0004] Carbon monoxide inhibits the blood's ability to carry oxygen tobody tissue, including vital organs such as the heart and brain. Whencarbon monoxide is inhaled, it combines with oxygen-carrying hemoglobinof the blood to form carboxyhemoglobin. Once combined with thehemoglobin, the hemoglobin is no longer available for transportingoxygen. The amount of carboxyhemoglobin that builds up is a factor ofthe concentration of the gas being inhaled and the duration of theexposure.

[0005] Carbon monoxide can act in the body in high concentrations, orslowly over a long period of time. Because it takes several hours toremove carbon monoxide from the body of a person, concentrations ofcarbon monoxide can gradually build up in the blood causing headaches,fatigue, dizziness, nausea, burning eyes, or unconsciousness.

[0006] Devices for sensing carbon monoxide and triggering an alarm inthe presence of excess concentrations of carbon monoxide are presentlyavailable. These CO detectors typically employ a solid state sensorwhich purges itself and resamples for carbon monoxide on a periodicbasis. However, conventional carbon monoxide detectors usually do notaccount for low levels of the carbon monoxide gas over long periods oftime. Known detectors of this type are intended to be plunged into ACreceptacles and are not battery powered.

[0007] Other types of known CO detectors utilize biomimetic sensors.Such devices are battery powered and detect changes in opacity of thebiomimetic material.

[0008] In addition to being generated by operation of various products,carbon monoxide is produced along with smoke by fire. Fire detectorsoperate on different principles than do carbon monoxide detectors. Knownfire detectors respond to heat, flame or smoke.

[0009] The range of presently available products includes separatecarbon monoxide and fire detectors. It would be useful if the sensingcharacteristics of these separate units could be incorporated into asingle, easy to use, easily installed, multi-mode product.

SUMMARY OF THE INVENTION

[0010] In view of the above, the present invention provides methods andapparatus for monitoring the presence and changes in the concentrationof carbon monoxide. A detector that embodies the invention may alsodetect the presence of smoke.

[0011] In one aspect, a combined smoke and CO detector is batteryoperated. The detector carries a carbon monoxide sensor that is sealeduntil it is to be used by a consumer.

[0012] The CO sensor is carried within a housing and is not userreplaceable. Removable tape seals the CO sensor until the detector isput into service. The sealing tape is applied when the carbon monoxidesensor is assembled. When a user places the detector into service thetape is removed thereby exposing the CO sensor to the ambient air.

[0013] An ionization-type smoke sensor is also carried within thehousing. Both sensors are coupled to a programmed processor. Thedetector is energized by a single replaceable battery.

[0014] The process, in response to signals from the sensors, can producean audible alarm indicative of the presence of carbon monoxide. Adifferent audible alarm, for example in accordance with NFPA standardNo. 72, can be produced to indicate the presence of smoke. In oneaspect, if both carbon monoxide and smoke are present, the processor cango immediately unto a fire alarm indicating state.

[0015] In yet another aspect, a test circuit can be provided. Forexample, activating the test button can test each sensor sequentially.In this instance, appropriate audible alarms can be alternatelyproduced.

[0016] In one aspect, a smoke determination can be made independently ofa CO determination. The smoke determination can predominate and forcethe generation of visible and audible alarms.

[0017] Visual indicators of an alarm condition provide visual feedbackto users. In one aspect, a symbol indicates if smoke is present and canbe illuminated in the presence of detected levels thereof. Similarly, inthe presence of pre-selected levels of carbon monoxide, a visual symbolindicative thereof can be illuminated. The visual indicators can besequentially illuminated during a test sequence.

[0018] In yet another aspect, the detector and both of the sensors canbe energized by a single battery. For example, a removable battery doorcan be provided. If the door is mounted in a user accessible side of thedetector it will be possible to replace the battery with removing thedetector from its mounted location.

[0019] The detector periodically measures the output of a CO sensor. Thedetector subtracts each sampled CO sensor output from the previoussampled sensor output. The difference of between the successive sampledsensor outputs are summed. The detector unit determines the rate ofchange of the sampled sensor outputs to determine the level of CO in theatmosphere. The detector can actuate an alarm when a predetermined COcondition is detected.

[0020] The methods and applications of the present invention provide ahighly efficient and low cost detector that is capable of detecting thepresence of carbon monoxide at an early stage to allow persons toevacuate the area. The detector can also detect low concentrations ofcarbon monoxide over long periods of time. The detector unit may alsodetect the presence of smoke.

[0021] The invention, together with further attendant advantages, willbest be understood by reference to the following detailed description ofthe presently preferred embodiments of the invention, taken inconjunction with the accompanying drawings. It is to be understood thatboth the foregoing general description and the following detaileddescription are exemplary and explanatory and are intended to providefurther explanation of the invention as claimed.

BRIEF DESCRIPTION OF THE DRAWINGS

[0022]FIG. 1 is a block diagram of a combined carbon monoxide and smokedetector;

[0023]FIG. 1a is a plan view of the detector;

[0024]FIG. 2 is a block diagram illustrating arrangement of FIGS. 2-1 .. . 2-4 which taken together are a schematic diagram of the detector ofFIG. 1;

[0025]FIG. 2a-1 and 2 a-2 taken together are a flow diagram of a mainroutine of the detector of FIG. 1;

[0026]FIG. 3 is a flow diagram of a SUB-ROUTINE OF THE MAIN ROUTINE ofFIGS. 2-a-1, -2;

[0027]FIG. 4 is a flow diagram of a POWER-UP sub-routine of the mainroutine of FIGS. 2a-1, -2;

[0028]FIG. 5 is a flow diagram of a WAKE sub-routine of the main routineof FIGS. 2a-1, -2;

[0029]FIG. 6 is a flow diagram of a RES1 sub-routine of the main routineof FIGS. 2a-1, -2;

[0030]FIG. 7 is a flow diagram of a RESET sub-routine and a RESET1sub-routine of the main routine of FIGS. 2a-1, -2;

[0031]FIG. 8 is a flow diagram of a LOOP sub-routine of the main routineof FIGS. 2a-1, -2;

[0032]FIG. 9 is a flow diagram of a NEG1 sub-routine of the main routineof FIGS. 2a-1, -2;

[0033]FIG. 10 is a flow diagram of a TESTR sub-routine of the mainroutine of FIGS. 2a-1, -2;

[0034]FIG. 11 is a flow diagram of a SMOKE CHECK sub-routine of the mainroutine of FIGS. 2a-1, -2;

[0035]FIG. 12 is a flow diagram of a TEST sub-routine of the mainroutine of FIGS. 2a-1, -2;

[0036]FIG. 13 is a block diagram of an alternate detector, carbonmonoxide;

[0037]FIG. 14 is a schematic diagram of the detector of FIG. 13;

[0038]FIG. 15 is a flow diagram illustrating the general operation ofthe detector of FIG. 13;

[0039]FIG. 16 is a flow diagram of a main routine of the detector ofFIG. 13;

[0040]FIG. 17 is a flow diagram of a WAKE sub-routine of the mainroutine of FIG. 16;

[0041]FIG. 18 is a flow diagram of a TESTER sub-routine and a BYE1sub-routine of the main routine of FIG. 16;

[0042]FIG. 19 is a flow diagram of an ACR1 sub-routine of the mainroutine of FIG. 16;

[0043]FIG. 20 is a flow diagram of a RESET sub-routine and a RESET1sub-routine of the main routine of FIG. 16;

[0044]FIG. 21 is a flow diagram of a LOOP sub-routine of the mainroutine of FIG. 16;

[0045]FIG. 22 is a flow diagram of a NEG1 sub-routine of the mainroutine of FIG. 16;

[0046]FIG. 23 is a flow diagram of a TEST sub-routine of the mainroutine of FIG. 16;

[0047]FIG. 24 is a flow diagram of a BAT1 sub-routine of the mainroutine of FIG. 16;

[0048]FIG. 25 is a flow diagram of an INSPECT sub-routine of the mainroutine of FIG. 16;

[0049]FIG. 26 is a flow diagram of a POS1 sub-routine, a ACC3sub-routine, and ADJ1 sub-routine of the main routine of FIG. 16;

[0050]FIG. 27 is a flow diagram of an ACCUM sub-routine and a SET6sub-routine of the main routine of FIG. 16;

[0051]FIG. 28 is a flow diagram of a CHKSP sub-routine of the mainroutine of FIG. 16;

[0052]FIG. 29 is a flow diagram of a SHOW sub-routine and a NOSHOWsub-routine of the main routine of FIG. 16;

[0053]FIG. 30 is a flow diagram of a XMITR sub-routine of the mainroutine of FIG. 16;

[0054]FIG. 31 is a flow diagram of a TIME sub-routine and TIME 1sub-routine of the main routine of FIG. 16;

[0055]FIG. 32 is a flow diagram of a DEL001 sub-routine, of the mainroutine of FIG. 16;

[0056]FIG. 33 is a flow diagram of a DEL225 sub-routine, and a DELPROGsub-routine of the main routine of FIG. 16; of the main routine of FIG.16;

[0057]FIG. 34 is a flow diagram of a CLRREG sub-routine of the mainroutine of FIG. 16; and

[0058]FIG. 35 is a flow diagram of a M16 sub-routine of the main routineof FIG. 16.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0059] Before explaining the present embodiments in detail, it should benoted that the invention is not limited in its application or use to thedetails of construction and arrangement of parts illustrated in theaccompanying drawings and description, because the illustrativeembodiments may be implemented or incorporated in other embodiments,variations and modifications, and may be practiced or carried out invarious ways. Furthermore, unless otherwise indicated, the terms andexpressions employed herein have been chosen for the purpose ofdescribing the illustrative embodiments for the convenience of thereader and are not for the purpose of limitation.

[0060] Referring now to the drawings and particularly to FIG. 1, a blockdiagram of a preferred embodiment of a detector 50 is illustrated. Thedetector 50 is a battery powered, single station, self-contained smokeand carbon monoxide alarm detector. The detector 50 detects the presenceand concentration of carbon monoxide in the atmosphere and provides awarning to indicate a hazardous condition of carbon monoxide. Thedetector 50 also detects the presence of smoke in the air and provides awarning to indicate the presence of smoke.

[0061] As shown in FIG. 1, the detector unit 50 includes a housing 50 a,control circuitry 100, an ionization sensing chamber, electronicmeasurement and control circuitry 110, audible and visual indicators,power circuitry, test/silence circuitry, temperature compensationcircuitry, reset circuitry, low voltage detection circuitry, testswitch/hush circuitry, output circuitry, interconnect circuitry andoscillator circuitry. Although it is shown as being constructed withvarious types of independent and separate units or devices, the detector50 may be implemented utilizing one or more integrated or logiccircuits, or a microprocessor which may be programmed to execute theoperations or functions equivalent to those performed by the circuitryunits shown. It is also contemplated that the detector can be carriedout with any suitable hardware components and circuitry designs,computer programming, or a combination thereof.

[0062]FIG. 1a shows a front plan view of the housing of the detectorunit 50. The housing includes a CO alarm indicator 50 a, a smoke alarmindicator 50 b, a low battery indicator 50 c, and a service statusvisual indicator 50 d. The housing also preferably includes a singletest/silence button as further illustrated below.

[0063] With respect to FIGS. 1 and 2, the control circuitry 100 of thedetector 50 includes a processing unit 102. As shown in FIG. 2, theprocessing unit 102 includes a Microchip PIC16C57, available frommicrochip. The processing unit 102 preferably has a 2 MHz internalclock, Read Only Memory (ROM), Random Access Memory (RAM), and aplurality of input/output (I/O) pins. The processing unit 102 controlsthe overall operation of the detector unit 50 and processes informationto determine a hazardous condition of carbon monoxide or smoke in theatmosphere. It will be understood that a variety of processing units orprocessors could be used without departing from the spirit and scope ofthe present invention.

[0064] The processing unit 102 preferably spends most of its time in a“sleep” mode in order to save power. While the processing unit 102 is inthe “sleep” mode, the detector 50 typically consumes about 5 μA ofcurrent. In the sleep mode, the internal clock of the processing unit102 is disabled and the program counter is stopped.

[0065] The processing unit 102 can be “awakened” either by an externallow level signal on pin 28 of the processing unit 102 or an internalreset initiated by an on-board watchdog timer. The watch dog timer ispreferably used as an operational cycle clock to awaken the processingunit 102 about every 3 seconds to increment a time counter whichrequires about 2 μA.

[0066] The processing unit 102 takes sensor samples about every 30seconds, battery and built-in tests occur about every 10 minutes. Inorder to limit the current drain of the detector unit 50 below 15 μA,the current used for sensor sampling cycle (which occurs once aboutevery 30 seconds for approximately 25 ms) is usually kept to an averageof about 5-6 μA. Unless the detector unit 50 is taking a sensor sample,checking the battery, performing a built-in test, or preforming auser-initiated push-button test, the processing unit 102 will usuallynot be turned on for more than 25 ms before the processing unit 102 isput back to sleep.

[0067] The electronic measurement circuitry 110 preferably includescarbon monoxide detection circuitry 112, smoke detection circuitry 114,and smoke calibration circuitry 116. The carbon monoxide detectioncircuitry 112 monitors the presence or absence of carbon monoxide. Wheninitially assembled a gas input port of the sensor 112 is covered by aremovable protective tape 112 a to prevent contamination. The tape 112 ais removed by the user when the detector 50 is first activated.

[0068] As shown in FIG. 2, the carbon monoxide detection circuitry 112includes resistors R16, R17, R33, and R34, a capacitor C5, a transistorQ2, and a biomimetic sensor S1. Preferably, the resistors R16, R17, R33and R34, are about 100 Ω, 330KΩ, 3.3KΩ and 1KΩ, respectively, and thecapacitor C5 is preferably about 0.022° F.

[0069] The sensor S1 of the carbon monoxide detection circuitry 112 isutilized to detect the presence or absence of carbon monoxide in thesurrounding atmosphere. The sensor S1 includes an infrared IR LED, asensing device and a photo diode. The sensing device S1 is preferably apassive component that requires no additional power for its operation.The sensor S1 is preferably a S30 model, manufactured by Quantum Group.

[0070] Temperature compensation circuitry or resistor/thermistor network150 drives the IR LED of the sensor S1 and acts as a constant currentsource, eliminating variations in the light output of the sensor S1which might otherwise be imparted by changes in the battery voltage. Thetemperature compensation or circuitry 150 preferably includes resistorsR18 and R20 and thermistor TH1. The resistors R18 and R20 are eachpreferably about 33 Ω. When the ambient temperature varies, changes inthe impedance of the thermistor TH1 adjusts the current supplied to theIR LED of the sensor S1, stabilizing the light output.

[0071] The light emitted (940 nm) by the IR LED is passed through thesensor and detected by the photo diode to provide a measure of theabsorbency of the sensor. Because the sensor darkens when exposed tocarbon monoxide, increased absorbency of the light energy of the LED canbe utilized to detect the presence of carbon monoxide in localizedatmospheric environments, such as, for example, inside homes, offices,etc. As carbon monoxide molecules are absorbed by the sensor, the sensorbecomes more opaque. In the absence of the carbon monoxide in theatmosphere, the sensor releases previously absorbed molecules (if anypresent) becoming more transparent in the process.

[0072] The photo diode of the sensor S1, the capacitor C5, the resistorR16, and the processing unit 102 comprise a pseudo analog-to-digital(A/D) converter capable of measuring the absorbency of the sensor S1with precision. The processing unit 102 receives and processes data onpin 9 supplied by the A/D conversion to determine the level of carbonmonoxide present in the surrounding atmosphere. The pseudo A/D processmeasures the time needed to charge the capacitor C5 when the IR LED ofthe sensor S1 is enabled.

[0073] Initially, before the IR LED is enabled, any residual charge onthe capacitor C5 is discharged to ground through the resistor R16 to pin8 of the processing unit 102. Pin 8 of the processing unit 102 is thenconfigured as a high impedance state input. The IR LED of the sensordevice S1 is enabled through pin 13 of the processing unit 102 and asoftware timer in the processing unit 102 is started.

[0074] The processing unit 102 supplies a constant bias voltage level tothe photo diode of the sensor S1. The voltage level is nearly the fullvalue of the power supply voltage V_(cc) since, even at the highestlevel of photo diode current, the voltage drop internal to theprocessing unit 102 (from supply pin 14 of the processing unit 102 tothe output on pin 2) is minimal.

[0075] Because the charging current induced in the photo diode PD isnearly constant (over relatively short sampling intervals), the voltageon the capacitor C5 rises linearly over time. When the ramping voltageof the capacitor reaches about 0.85 Vcc, the software timer isterminated and a sampling time (ST) count is thereby obtained.

[0076] The absorbency of the sensor is sampled once about every 30seconds. Each time the sensor absorbency is sampled, the sampling timevalue is compared with predetermined or programmable limits.

[0077] If the sensor is too light or too dark or sample time is tooshort or too long, a FAULT routine, as further described below, isinitiated by the detector unit 50. Otherwise, the current value of thesample is compared with the value from the previous sample measurement,and the difference is stored in one of a plurality of storage registers.Subsequently, the storage registers are summed, and the value is placedin a sum register and also added to an alarm register.

[0078] The discrete sampling time values of the sensor S1 are measuredover time by an the processor 102 as further described below. Since thelight output for the LED of the sensor S1 is virtually constant overtime, temperature, and voltage, the only mechanism by which the samplingtime can change is relative absorbency of the sensor S1. When theconcentration of carbon monoxide in the atmosphere surrounding thesensor increases, the sensor darkens and iterative sample times measuredby the A/D converter lengthen or increase.

[0079] The sample time rate-of-change (dST/dt), is monitored by theprocessing unit 102, and its magnitude is used to trigger an “alarm”condition (i.e., a high level alarm) when the carbon monoxide levelspresent a hazardous condition. The sensor S1 also responds to variouscarbon monoxide concentrations in the manner consistent with the ULTO34standard.

[0080] A status flag (i.e., ALARM FLAG) is set when the value in thealarm register reaches full scale (i.e., 255 decibel). At this time ahigh level alarm is issued. When the carbon monoxide drops below about50 ppm, the sensor begins to lighten and the values in the sum registerbecome negative, causing a reduction in the value stored in the alarmregister. If the value in the alarm register falls to about 48 or below,the sample, flag, and alarm registers in the high level alarm will becleared, and the detector unit 50 will resume normal operation.

[0081] The A/D converter operation of the carbon monoxide detectioncircuitry 112 is verified by the processing unit 102 on power-up andabout every 10 minutes thereafter (i.e., about every 20 sensor samplingcycles). The integrating capacitor C5 of the carbon monoxide detectioncircuitry 112 is discharged, and then allowed to charge by currentsupplied by pin 6 of the processing unit 102 through the A/D testresistor R17.

[0082] The software timer of the processing unit 102 executes a sampletime measurements and the resultant value has to lie within programlimits. This test checks for excessive leakage, shorting, or improperoperation of the A/D measurement components. Any failure sets a faultflag and a fault condition is annunciated to notify the user.

[0083] The smoke detection circuitry 114 of the electronic measurementcircuitry 110 detects the presence of smoke in the atmosphere. The smokedetection circuitry provides a signal to the processing unit 50 thatgenerates a warning signal.

[0084] As shown in FIG. 2, the smoke detection circuitry 114 preferablyincludes a smoke detector D1, a smoke comparator unit U2, capacitors C3,C10, and C14, and resistors R2, R3, R4, R5, R28, and R30. The smokecomparator unit U2 is preferably a comparator such as Model No.SC41411PK available from Motorola (comparable to MC14467). Thecapacitors C3, C10, and C14 are each preferably about 0.1 μF, and theresistors R2, R3, R4, R5, R28, and R30 are preferably about 1.5 MΩ, 8.2KΩ, 1.5 KΩ, 470 KΩ, 1 MΩ, and 33 Ω, respectively.

[0085] The smoke detector D1 preferably includes a single source dualionization chamber C1 having an active chamber C1, a sensing electrodeE1, and an ion chamber I1. A 1.0 μCi maximum source of American 241 isemployed in the ionization chamber.

[0086] The active chamber C1 is connected to ground by the parallelcombination of the resistor R28 and the capacitor C10. The capacitor C10provides transient protection for the active chamber C1, and theresistor R28 allows the active chamber C1 of the smoke detector D1 to beraised above ground by pin 18 of the processing unit 1 d SW3 are closed,3.3 volts is applied by pin 18 of the processing unit 102 to theresistor R28 to simulate about 40-50 pA MIC.

[0087] The sensing electrode E1 of the smoke detector D1 is connected tothe non-inverting input (pin 15) of the smoke comparator unit U2. Theconnection of the sensing electrode, a very high impedance point, to thenon-inventing input is preferably a flying connection to minimizeleakage effects due to the presence of a printed circuit board.

[0088] Pins 14 and 16 of the smoke comparator unit U2 are connectedtogether internally to a voltage follower of a non-inventing input ofthe smoke comparator unit U2 to provide an active guard output. Thisactive guard reduces the effect of leakage between non-inventing inputof the smoke comparator unit U2 and adjacent pins.

[0089] An alarm feedback pin (pin 1) of the smoke comparator unit U2 ismonitored by the processing unit 102 to determine if a smoke conditionexists. The feedback pin is preferably pulled to about 3.3 volts by apull-up resistor R5 in a clean air condition. When smoke is present, thevoltage across the dual chamber decreases and the voltage at the sensingelectrode E1 increases.

[0090] The alarm feedback pin of the smoke comparator unit U2 willchange to a low level state which is then read by the processing unit102. The processing unit 102 will then go into a smoke alarm mode andturn on a smoke horn. The horn pattern consists of an active phaselasting about 0.5 seconds +/−10% followed by an off-phase lasting about0.5 seconds +/−10%, for three successive active periods, which are thenfollowed by an off-phase lasting about 1.5 seconds +/−10%. This patternis comparable to that specified by NFPA 72. Other patterns can be storedin the processor to use as needed.

[0091] The circuitry 114 establishes, using an alarm thresholdestablished thereby, if enough smoke is present to warrant generating asmoke alarm. If so, the two state smoke alarm output signal goes from ahigh to a low which is indicative of a smoke alarm state. The processor102 will in turn activate the visible and audible smoke alarms. This iscompletely independent of processing for the presence of CO.

[0092] The smoke calibration circuit 116 of the electronic measurementcircuitry 110 preferably includes resistors R14, R32, and R36. Theresistors R14, R32, and R36 are preferably 1 MΩ, 1 MΩ, and 1.5 MΩ. Theresistors R14, R32, and R36 preferably form a resistive divider toprovide a reference voltage for the inverting input (pin 13) of thesmoke comparator unit U2. The voltage division at the inverting input isdesigned so that under clean air conditions the two inputs are differentto provide a nominal sensitivity of 67 pA MIC and that no alarm results.

[0093] On power-up of the detector 50, and about every 24 hoursthereafter, proper smoke detector operation is verified by theprocessing unit 102. Initially, the resistor R28 of the smokecalibration circuitry 116 is raised above circuit ground by pin 18 ofthe processing unit 102. As a result, the voltage across the dualchamber of the detector D1 is lowered and the voltage at the sensingelectrode E1 is raised.

[0094] The processing unit 102 applies about 3.3 volts to the resistorR28 to simulate about 40-50 pA MIC. The processing unit 102 thenmonitors the output of the smoke comparator U2 about every 10 seconds orless. Any failure of the smoke comparator U2 sets the fault flag and afault condition is annunciated to notify the user.

[0095] A manual test mode is also provided for by the detector unit 50.This test mode is activated by the user, who simply pushes atest/silence button on the face of the detector unit until a horn chirpis issued and a yellow service LED flashes. Once the test mode isentered, the processing unit 102 applies 3.3 volts to the resistor R28of the smoke detection circuitry 114 to simulate about a 40-50 pA MIC.The processing unit 102 then monitors the output of the smoke comparatorunit U2 Every 10 seconds or less until it is pulled low, which signifiesa smoke condition. Any failure sets a fault flag and a fault conditionis annunciated to notify the user, and the carbon monoxide test isterminated.

[0096] If the output of the smoke comparator unit U2 is at a low levelstate before timing out, the processing unit 102 will emit one cycle ofthe smoke alarm pattern. If the detector unit 50 passes, the processingunit 102 pauses for about one second to separate smoke and carbonmonoxide tests. Then each green or yellow flash of a power LED dependingon the battery status is preceded by a sensor sample cycle. Each ofthese samples is taken with pin 6 of the processing unit 102 configuredas an input pulled to ground, stealing current through the resistor R33of the carbon monoxide detection circuitry 112 which is normallysupplied by pin 13 of the processing unit 102 to the base of transistorQ2. This activity “starves” the respective LED, reducing the lightadmitted through the sensor, and effectively simulates a carbon monoxideexposure, filling the alarm register with about 3 to 5 sample cycles. Asuccessful manual test results in a self-induced high level alarm statewhich is enabled for two cycles of the alarm pattern (i.e., on for 1.5seconds and off for 1.5 seconds) indicating that the detector unit 50 isoperating properly.

[0097] The audio and visual indicators 120 of the detector 50 are usedin conjunction with various self-tests and user-initiated tests toindicate when the detector unit 50 is operating normally or has aproblem which requires service. The audio and visual indicators 120 alsoalert persons nearby when smoke and carbon monoxide concentrations areunhealthy or dangerous. The audio and visual indicators 120 includecarbon monoxide alarm indicator circuitry 122, smoke alarm indicatorcircuitry 124, horn driving circuitry 126, service indicator circuitry128, and power/low battery indicator circuitry 129.

[0098] The carbon monoxide alarm indicator circuitry 122 of the audioand visual indicators 120 preferably includes an indicator light LED2and resistor R12. The light emitting diode LED2 is preferably a redlight emitting diode (LED), and the resistor R12 is about 180 Ω. Thecarbon monoxide alarm indicator circuitry 112 is electrically coupled topin 23 of the processing unit 102. The processing unit 102 activates theindicator light LED2 by pulling pin 23 to a low level state to provide acurrent path (typically, about 8 mA) from the power source through theindicator light LED2 and the current limiting resistor R12 to ground.

[0099] The smoke alarm indicator circuitry 124 of the audio and visualindicators 120 preferably includes an indicator light LED3 and aresistor R13. The indicator light LED3 is preferably a red lightemitting diode (LED), and the resistor R13 is about 180 Ω. The smokealarm indicator circuitry 124 is electrically coupled to pin 22 of theprocessing unit 102. The processing unit 102 activates the indicatorlight LED3 by pulling pin 22 to a low level state to provide a currentpath (typically, about 8 mA) from the power source through the indicatorlight LED3 and current limiting resistor R13 to ground.

[0100] The horn driving circuitry 126 of the audio and visual indicators120 preferably includes a power oscillator U4, a piezoelectric alarm H1,resistors R19, R25, R37 and R38, and transistor Q4. The power oscillatorU4 is preferably a MC14049VBCP available from Motorola is a known typeused with smoke detectors. The resistors R19, R25, R37, and R38 arepreferably about 1.5 MΩ, 1.5 MΩ, 1 KΩ, and 1 KΩ, respectively, thecapacitor C7 is preferably about 0.0022 μF.

[0101] The piezoelectric alarm H1 is driven by the power oscillator U4.Pin 2 of the piezoelectric alarm allows the power oscillator to resonateat a particular frequency, preferably within a range of about 3.5 kHz.In order to turn the piezoelectric alarm H1 on, the processing unit 102sets output pin 11 to a high level state, putting the transistor Q4 intosaturation, effectively connecting pin 8 of the power oscillator U4directly to ground.

[0102] In operation, the detector unit 50 has a special alarm silencingfunction that can be initiated by the user to silence the alarm. Thisfunction is activated by pressing a test/silence button on the detectorunit 50. When the detector is in a smoke alarm state, pressing thebutton will put the detector unit into a silence mode. This mode willsilence the horn for about 8 minutes. During this time, the lightindicator LED3 of the smoke alarm indicator circuitry 124 will remainon. Pressing the test/reset button again while in silence mode, willreset a silence interval timer.

[0103] When in silence mode, the processing unit 102 desensitizes theion chamber I1 by turning on the transistor Q5 of the hush/testcircuitry 130, pulling the ion chamber to ground. Increasing levels ofsmoke will kick the processing unit 102 out of hush mode and continuewith a smoke alarm condition.

[0104] When the detector is in a high level carbon monoxide alarm state,pressing the test/reset button will silence the horn for about 4minutes. However, the light indicator LED2 of the carbon monoxideindicator circuitry 122 will remain on. The high level carbon monoxidealarm can be silenced only one time.

[0105] The power circuitry 130 of the detector unit 50 provides power tothe various components of the detector unit 50. The power circuitry 130includes a power supply and filter circuitry 132, reverse biasprotection circuitry 134, and voltage regulator and filter circuitry136. The power supply and filter circuitry 132 preferably includes a 9volt battery B1 and a capacitor C2. Preferably, the battery B1 suppliespower (i.e., about 8.4 volts) to the smoke comparator unit U2 and otherassociated circuitry. The battery is preferably a 9 volt alkaline typeand the capacitor C2 is about 0.1 μF.

[0106] The voltage regulator and filter circuitry 136 of the powercircuitry 130 preferably includes a voltage regulator U1, and capacitorsC8 and C9. The voltage regulator U1 supplies a regulated 3.3 VDC to theprocessing unit 102 and its associated circuitry. The 3.3 volt levelminimizes overall current drain in the detector unit, which is typicallyabout 5-7 μA. The voltage regulator U1 is preferably a Seiko S81233SGand the capacitors C8 and C9 are about 2.2 μF and 0.1 μF, respectively.

[0107] The reset circuitry 160 of the detector 50 insures proper resetof the processing unit 102 when the battery B1 is removed by dischargingany capacitance on the output of voltage regulator U1. The reset circuit160 of the detector unit 50 preferably includes resistors R26, R27, R31,and R40, a capacitor C13 and a transistor Q3. The resistors R26, R27,R31, and R40 are preferably about 3.9 KΩ, 10 MΩ, 33 KΩ, and 10 MΩ,respectively, the capacitor C13 is about 0.1 μF.

[0108] The reverse bias protection circuitry 134 of the power circuitry130 provides protection for the circuitry of the detector unit 50 whenthe battery is installed improperly. The reverse bias protectioncircuitry 134 preferably includes a diode D5 and a resistor R35. Thediode D5 of the reverse bias protection circuitry 134 prevents anydamaging current flow through the voltage regulator U1 and thecapacities C2, C8, and C9 if the battery is installed backwards. Theresistor R35 is about 1KΩ.

[0109] The resistor R35 of the reverse bias protection circuitry 134limits current through a voltage detector U3 to a non-damaging levelwhen the battery B1 is installed backwards, but is not large enough tosubstantially effect the level of the battery voltage at the input (pin2) of the voltage detector U3. The quiescent current drain through thevoltage detector U3 is typically about 1 μA, creating a voltage dropacross the resistor R32 of only about 0.001 V_(dc).

[0110] About once every 10 minutes or every 20 operation cycles, thebattery B1 is tested to insure it retains sufficient capacity to sustainoperation after a low battery condition is detected as specified byUL2034 standards. During this test, the processing unit 102 enables theIR LED of the sensor S1 for 10 mS (which consumes about 20 mA) to loadthe battery for an accurate measurement.

[0111] Before turning the IR LED off, the processing unit 102 samplesthe state of pin 1 of the voltage detector U3. When the battery levelunder load exceeds 7.5 V_(dc) (the trip point of the voltage detectorU3), the resistor R23 pulls up the open collector output (pin 1) of thevoltage detector U3 to 3.3 volts. As a result, a high logic level isdetected by pin 16 of the processing unit 102, which indicates thepresence of a sufficient battery level. On the other hand, if thebattery level under load is less than 7.5 V_(dc), the open collectoroutput of the voltage detector U3 will be pulled to ground, causing pin16 of the processing unit 102 to detect a low logic level. In this case,the processing unit 102 sets a LOW BATTERY flag and indicates thiscondition to the user.

[0112]FIGS. 2a-1, 2 a-2 taken together illustrate as, a flow diagram ageneral overview of the operations carried out by the detector 50. Asshown in FIGS. 2a-1, after the detector 50 is awakened at block 250 a orthe detector 50 is powered up at block 250 b, the detector 50initializes a watchdog timer and initializes one or more ports at block250 c. At block 250 d, the detector 50 determines whether it was justpowered up.

[0113] If the detector 50 was just powered up, it sets a power-up delayat block 250 e. At block 240 f, the detector 50 initializes one or morecounters, clears one or more sample registers, clears one or more flagregisters, and clears the alarm register. The detector 50 then obtainsan initial sensor count at block 250 g and then goes into the sleep modeat block 250 h.

[0114] If the detector 50 was not just powered up at block 250 d, itwill determine whether there is a smoke alarm condition a block 250 i(based on a binary, low, output signal for comparator U2). If there is asmoke alarm condition, the detector 50 will flash the LED3 of the smokeindicator circuitry 124 and sound the smoke horn pattern at 250 j. Theprocess then proceeds to block 250 k as further described below.

[0115] If a smoke alarm condition is not detected at block 250 i, thedetector 50 will determine whether a manual test has been initiated atblock 250 k. If a manual test has been initiated, the detector 50 willperform the manual test and then go into the sleep mode at block 250 h.

[0116] If a manual test has not been initiated at block 250 k, thedetector 50 determines whether to perform a 30 second CO sample at block2501. If the detector 50 does not have to obtain a 30 second sample, itwill go into the sleep mode at block 250 h.

[0117] If the detector 50 has to obtain a 30 second sample at block2501, that sensor count is attained at block 250 m and then the detector50 determines whether to perform a 24 hour smoke test at block 250 n. Ifa 24 hour smoke test is to be performed, the detector 50 tests the smokealarm indicator circuitry 124. The process then proceeds to block 250 qas further described below.

[0118] If a 24 hour smoke test is not to be performed at block 250 n,the detector determines whether to perform a 10 minute A-to-D test atblock 250 p. If the detector 50 does not have to perform the 10 minuteA-to-D test, the process proceeds to block 250 r as further describedbelow.

[0119] If the A-to-D test is to be performed at block 250 p, thedetector 50 tests the A-to-D circuitry at block 250 q. The detector 50then checks the carbon monoxide rate of change at block 250 r anddetermines whether to activate the carbon monoxide alarm at block 250 s.This determination is independent of the output of the smoke detectorcircuit U2.

[0120] If the carbon monoxide alarm detector is to be activated, thedetector 50 will determine whether to also activate a smoke alarm atblock 250 t. If the smoke alarm is not to be activated, the detector 50will flash the light indicator LED2 of the carbon monoxide alarmindicator circuitry 122 and sound the carbon monoxide horn pattern atblock 250 u.

[0121] If the smoke alarm is to be activated at block 250 t, thedetector 50 will turn off the light indicator LED2 and turn off thecarbon monoxide horn pattern. The process will then proceed to block 250x as further described below.

[0122] If the carbon monoxide alarm is not to be activated at 250 s, thedetector 50 will turn off the light indicator LED3 of the carbonmonoxide alarm indicator circuitry 122 and the carbon monoxide hornpattern at block 250 w. At block 250 x, the data will be examined andthe detector 50 will determine whether there are any faults at block 250y.

[0123] If there are no faults, the detector unit 50 will go into thesleep mode at block 250 h. If faults are detected at block 250 y, thedetector 50 will determine whether the carbon monoxide or smoke alarmhas been activated at block 250 z. If the carbon monoxide or smoke alarmis activated, the processing unit 102 will go into the sleep mode atblock 250 h. If the carbon monoxide or smoke alarm is not activated, thedetector unit 50 will initiate a trouble chirp at block 250 aa and thengo into the sleep mode at block 250 h.

[0124]FIGS. 3 through 12 illustrate detailed flow diagrams of theoperations carried out by the detector 50. FIG. 3 illustrates a mainroutine 300 of the process carried out by the detector 50 to implementvarious tests, alarm conditions, and smoke and carbon monoxide checks.Initially, the detector unit 50 sets a wake-up time at block 302. Thedetector unit 50 sets the wake-up time at about 3 seconds for normalmode, about 1.5 seconds for alarm mode, and about 0.75 seconds for testmode. The detector unit 50 then initializes ports A-C at block 304 andthen determines whether a TIME OUT bit has been cleared at block 306. Ifthe TIME OUT bit has been cleared, the process proceeds to the WAKEsub-routine as further described below.

[0125] If the TIME OUT bit has not been cleared at block 306, thedetector 50 determines whether a POWER DOWN bit has been set at block312. If the POWER DOWN bit has not been set, the process proceeds to aPOWER UP routine as further described below. If the POWER DOWN bit isset at block 312, the detector unit 50 increments a SPECIAL TEST counterat block 314 and then determines whether the SPECIAL TEST counter isgreater than 2 at block 316. If the SPECIAL TEST counter is greater than2, the process proceeds to the WAKE sub-routine. If the SPECIAL TESTcounter is not greater than 2 at block 324, the detector unit 50initializes a TEST counter, sets a START flag at block 318, and thenproceeds to a LOOP sub-routine as further described below.

[0126]FIG. 4 illustrates a POWERUP sub-routine 320. When the detector 50is initially turned on, the POWERUP sub-routine initializes variouscounters, registers, and flags. At block 320 a the detector 50initializes a WAKE UP counter, a SAMPLE counter, and a TEST counter. Thedetector 50 then clears the registers and flags and sets a START flag ablock 320 b. The detector 50 then waits about 255 ms at block 320 c andsets the ALARM TOGGLE counter CTR equal to 4 at block 320 d. Thedetector 50 clears the ALARM register at block 320 e and then it goesinto the sleep mode.

[0127]FIG. 5 illustrates a WAKE sub-routine 330 that is carried out whenthe detector 50 is awakened from the sleep mode. At block 330 a, thedetector 50 determines whether the TEST mode flag is set. If a TEST modeflag is set, the process proceeds to a RESUMET sub-routine 330 b. Duringthe RESUMET sub-routine 3306, the detector 50 is kept STARVED (asdescribed above) at block 330 c, the yellow light is kept on at block330 d, and the WAKE UP counter is set equal to 1 at block 330 e. Thedetector unit 50 then determines whether the ALARM flag is set at block330 f. If an ALARM flag is set, the process proceeds to a RESETsub-routine as further described below. If the ALARM flag is not set,the process proceeds to a LOOP sub-routine as further described below.

[0128] If the TEST mode flag is not set at block 330 a, the detector 50determines whether the ALARM flag is set at block 330 c. If the ALARMflag is set, the detector 50 determines whether there is a smoke orcarbon monoxide condition at block 330 d. If the ALARM flag is not setat block 330 c, the detector 50 determines whether the TEST switch ispressed at block 330 e. If the TEST switch is not pressed, the processproceeds to a BYE1 sub-routine as further described below.

[0129] If the TEST switch is pressed at block 330 e, the detector 50saves the ALARM register at block 330 f, sets a TEST flag, sets a WAKEUPcounter equal to 1, and turns on the yellow LED4 of the power/lowbattery indicator circuitry 129 at block 330 g. The detector 50 thendetermines whether the battery level is low at block 330 h. If thebattery level is not low, the green LED4 of the power/low batteryindicator circuitry 129 is turned on at block 330 l.

[0130] If the battery level of the detector 50 is low at block 330 h,the detector turns on the yellow LED at block 330 j. The detector thensimulates a smoke alarm and turns on the smoke LED3 of the smoke alarmindicator circuitry 124 at block 330 k and sound a smoke alarm patternat block 3301. The detector unit then turns off the smoke LED andsimulates the carbon monoxide alarm at block 330 m. The detector 50 nowturns on the carbon monoxide alarm horn pattern and the LED2 of thecarbon monoxide alarm indicator circuitry 122 at block 330 n.Thereafter, the detector 50 turns off the carbon monoxide alarm and thecarbon monoxide alarm LED3 at block 330 o. The detector will then enterthe sleep mode.

[0131]FIG. 6 illustrates, a RS1 sub-routine 340. The reset sub-routine340 is utilized to flash the red and yellow LEDS as CO samples are takenduring the test function and sound the alarm when the circuitry haspassed the self test. At block 340 a, the detector 50 determines whethera QUIET flag is set. If the QUIET flag is set, the detector 50 turns offa BEEPER at block 340 b, reloads a TOGGLE register at block 340 c, andturns off the red LED2 and yellow LED3 at block 340 d.

[0132] If the QUIET flag is not set at block 340 a, the detector 50decrements the TOGGLE register at block 340 e and then determineswhether the TOGGLE register is equal to zero at block 340 f. If theTOGGLE register is equal to zero, the process proceeds to block 340 b asdescribed above.

[0133] If the TOGGLE register is not equal to zero at block 340 f, thedetector 50 turns on the BEEPER at block 340 g and turns on the red LED2and yellow LED3 at block 340 d. Subsequently, the process proceeds tothe BYE1 sub-routine as further described below.

[0134]FIG. 7 illustrates a RESET sub-routine 350 and a RESET1sub-routine 355. The RESET sub-routine and RESET1 sub-routine areutilized to restore registers after a manual test.

[0135] When the detector 50 carries out the RESET sub-routine 350, itrestores the ALARM value at block 350 a, reloads the WAKEUP counter atblock 350 b, and calls CLRREG at block 350 c. The process then proceedsto a SHOW sub-routine as further described below.

[0136] When the detector 50 carries out the RESET1 sub-routine 355, itreloads the wake-up counter at block 350 b and calls CLRREG at block 250c. The process then proceeds to the SHOW sub-routine.

[0137] Referring now to FIG. 8 illustrates a LOOP sub-routine 360. TheLOOP sub-routine is utilized to determine if the CO alarm flag is setduring a test, or if more samples must be taken.

[0138] At block 360 a, the detector unit 50 retrieves the TIME and thendetermines whether the carbon monoxide ALARM flag is set at block 360 b.If the carbon monoxide ALARM flag is set, the process proceeds to aLOOP2 sub-routine as further described below.

[0139] If the carbon monoxide ALARM flag is not set at block 360 b, thedetector determines whether the TEST flag is set at block 360 c. If theTEST flag is set, the process proceeds to the LOOP2 sub-routine.

[0140] If the TEST flag is not set at block 360 c, the detectordecrements the TEST counter at block 360 d and then determines whetherthe TEST counter is equal to zero at block 360 e. If the TEST counter isnot equal to zero, the process proceeds to the LOOP2 sub-routine. If theTEST counter is equal to zero, the process proceeds to the TESTsub-routine as further described below.

[0141]FIG. 9 illustrates a NEG1 sub-routine 370 to carry out a reductionin the counts value to clear an alarm condition if the CO level isdecreasing. At block 370 a, the detector 50 clears the DIRECTION flagand the subtracts a REDCT value from an ALARM register at block 370 b.At block 370 c, the detector 50 determines whether the carbon monoxideALARM is negative.

[0142] If the carbon monoxide ALARM is not negative, the processproceeds to block 370 d as further described below. If the carbonmonoxide ALARM is negative at block 370 c, the detector clears thecarbon monoxide ALARM at block 370 e and then determines whether anALARM value is less than an ALROFF value at block 370 d. If the ALARM isless than ALROFF, then the detector 50 clears the carbon monoxide ALARMat block 370 f.

[0143] If the ALARM value is not greater than the ALROFF value at block370 d, the detector 50 decrements a NEGATIVE READING counter at block370 g. If the NEGATIVE READING counter is equal to zero, the detectorunit calls CLRREG and the process proceed to the SHOW sub-routine. Ifthe NEGATIVE READING counter is not equal to zero, the process proceedscorrectly to the SHOW sub-routine:

[0144]FIG. 10 illustrates a TESTR sub-routine 380. The TESTR sub-routine380 is utilized when the test switch is pressed by a user.

[0145] At block 380 a, the detector unit 50 determines whether the testswitch is pressed. If the test switch is not pressed, the processproceeds to the RES1 sub-routine 340 as described above. If the TESTSWITCH is pressed at 380 a, the detector 50 determines whether the unitis in a smoke alarm condition at block 380 b.

[0146] If the detector 50 is not in a smoke alarm condition at block 380b, it activates the carbon monoxide ALARM at block 380 c, sets a fourminute delay at block 380 d, sets a QUIET carbon monoxide flag at block380 e, turns off the carbon monoxide ALARM at block 380 f, sets acounter at block 380 g, and decrements the counter at block 380 h. Atblock 380 i, the detector 50 determines whether the counter has timedout. If the counter has not timed out, the process proceeds to block 380h. If the counter has time out at block 380 i, the detector 50 clearsthe QUIET flag at block 380 j and turns on the carbon monoxide ALARM atblock 380 k. The process then returns to the beginning of the TESTRsub-routine 380.

[0147] If the detector 50 is in a smoke alarm condition at block 380 b,it sets an eight minute delay at block 3801, sets a QUIET smoke flag atblock 380 m, turns off the smoke alarm at block 380 n, sets a counter atblock 380 o, and decrements the counter at block 380 p. The detector 50determines whether the smoke is increasing at block 380 g.

[0148] If the smoke is increasing, the detector activates the smokealarm at block 380 r and the process proceeds to the beginning of theTESTR sub-routine 380. If the smoke is not increasing at block 380 g,the detector 50 determines whether the counter has timed out at block380 s.

[0149] If the counter has not timed out, the process proceeds to block380 p. If the counter has timed out at block 380 s, the detector 50clears the QUIET flag at block 380 f and activates the smoke alarm atblock 380 r. The process then proceeds to the beginning of the TESTRsub-routine 380.

[0150]FIG. 11 illustrates a SMOKE CHECK sub-routine 390. The SMOKE CHECKsub-routine determines whether the smoke sensor has detected thepresence of smoke in the atmosphere and initiates a smoke alarm.

[0151] At block 390 a, the detector 50 clears a ten minute SMOKE flag.The detector 50 then determines whether a smoke test is in progress atblock 390 b.

[0152] If the smoke test is in progress, the process proceeds to aSMK-TEST sub-routine as further described below. If the detector 50 isnot to carry out a smoke test, it checks a smoke feedback pin of thesensor at block 390 c. The detector unit then determines whether smokeis present in the atmosphere at block 390 d.

[0153] If smoke is not present, the detector 50 determines whether therehas been a smoke glitch at block 390 e. If there has been a smokeglitch, the process proceeds to block 390 b. If there is not smokeglitch at block 390 e, the detector 50 clears the smoke at block 390 dand returns to the beginning of the SMOKE CHECK sub-routine 390.

[0154] If the detector unit 50 determines that smoke is present at block390 d, it continues processing at block 390 f. The detector 50 thendetermines whether it is in a silence mode at block 390 g. If thedetector unit 50 is in the hush mode, the process proceeds to a SMOKEPRIORITY sub-routine as further described below.

[0155] If the detector 50 is not in the silence mode at block 390 g, itthe detector unit 500 sets a SMOKE flag at block 390 h and thendetermines whether to execute a Canadian horn pattern at block 390 i.One of the advantages of the detector 50 is its ability to store aplurality of horn patterns and use one or more selected patterns.

[0156] If the Canadian horn pattern is implemented by the detector 50 atblock 390 i, it turns on the smoke LED3 at block 390 j and turns on theSMOKE BEEPER at block 390 k. The process then returns to the beginningof the SMOKE CHECK sub-routine.

[0157] If the Canadian horn pattern is to be executed at block 390 i,the detector 50 will turn on the smoke LED3 at block 3901 and will turnon the Canadian smoke beeper at block 390 m. The process then returns tothe beginning of the SMOKE CHECK sub-routine 390.

[0158]FIG. 12 illustrates a TEST sub-routine 400 to test smoke sensorfunctioning. Initially, the detector 50 clears an ERROR flag and LOWTEMP flag at block 400 a, saves all the data at block 400 b, sets up atest current at block 400 c, and calls an TIME1 at block 400 d. Thedetector 50 then determines whether the sensor output is less than aBOTLIM value at block 400 e. If the sensor output is less than theBOTLIM value, the detector 50 sets an ERROR flag at block 400 f and theprocess proceeds to block 400 h as further described below.

[0159] If the sensor output is not less than the BOTLIM value at block400 e, the detector 50 determines whether the sensor output is greaterthan a TOPLIM value at block 400 g. If the sensor output is less thanthe TOPLIM value, the detector 50 sets the ERROR flag at block 400 f andthe process proceeds to block 400 h. If the sensor output is not lessthan the TOPLIM value at block 400 g, the detector 50 determines whetheran ALARM is greater than zero at block 400 h.

[0160] If the ALARM is not greater than zero at block 400 h, thedetector 50 subtracts a REDMIN value from the ALARM register at block400 i and then determines whether the ALARM register is negative atblock 400 j. If the ALARM register is negative, the detector 50 sets theALARM register equal to zero at block 400 k and the process proceeds toblock 400 l as further described below. If the ALARM register is notnegative at block 400 j, the process proceeds to block 400 l.

[0161] If the ALARM is greater than zero at block 400 h, the detector 50turns on the thermistor at block 400 l, calls TIME1 at block 400 m, andclears a LOW TEMP flag at block 400 n. The detector 50 then determineswhether a HIGH BYTE value is greater than REF value at block 400 o.

[0162] If the HIGH BYTE value is not greater than REF value, thedetector restores the saved data at block 400 p, and initializes theWAKEUP counter and restores the TEST counter at block 400 q. The processthen proceeds to the BAT1 sub-routine as further described below.

[0163] If the HIGH BYTE value is greater than the REF value at block 400o, the detector 500 sets the LOW TEMP flag at 400 r, restores the saveddata at block 400 p, initializes the WAKEUP counter, and restores theTEST counter at block 400 q. The process then proceeds to the BAT1sub-routine.

[0164] Referring now to FIG. 13, a block diagram of another embodimentof a detector 500 is illustrated. The detector 500 is a battery powered,single station, self-contained carbon monoxide alarm. The detector 500detects the presence and concentration of carbon monoxide in theatmosphere and provides a warning of potential hazardous carbon monoxideconditions. The detector 500 corresponds in many respects inconstruction and function to the previously described detector 50 exceptthat the detector 500 does not detected the presence of smoke. Thecomponent of the detector 500 generally corresponding to thosecomponents of the detector unit 50 are designated by like-referencenumerals in the six-hundred series. As shown in FIG. 14, the centralprocessing unit 602 includes a microchip PIC16C58A, available frommicrochip.

[0165]FIG. 15 illustrates a flow diagram of the general operationscarried out by the detector 500. The detector monitors the carbonmonoxide in the atmosphere and sounds an alarm if a hazard condition ispresent.

[0166] After the detector 500 is awakened at block 800 a or powered upat block 800 b, the detector initializes a watchdog timer andinitializes one or more ports at block 800 c. At block 800 d, thedetector 500 determines whether the unit was just powered up. If thedetector 500 was just powered up, the detector implements a power-updelay at block 800 e, and then initializes one or more counters, clearsone or more sample registers, clears one or more flag registers, andclears an alarm register at block 800 f. The detector 500 then obtainsan initial sensor count at block 800 g and then the detector 500 is putin the sleep mode at block 800 h.

[0167] If the detector 500 was not recently powered up at block 800 d,the detector 500 determines whether to implement a manual test at block800 i. If the manual test is to be implemented, the detector 500performs the manual test at block 800 j and then the detector 500 is putin the sleep mode at block 800 h.

[0168] If a manual test is not to be performed at block 800 i, thedetector 500 determines whether to obtain a 30 second sample at block800 k. If the detector 500 is not to obtain a sample, the detector 500will be put in the sleep mode at block 800 h.

[0169] If the detector 500 is to obtain a 30 second sample at block 800k, the detector 500 obtains a sensor count at block 8001 and thendetermines whether to perform a 10 minute A-to-D test at block 800 m. Ifthe detector 500 is not to perform the A-to-D test, the process proceedsto block 800 o.

[0170] If the detector 500 is to perform the 10 minute A-to-D test atblock 800 m, the detector 500 tests the A-to-D circuitry at block 800 nand then checks the carbon monoxide rate of change at block 800 o.

[0171] At block 800 p, the detector 500 determines whether to activatethe carbon monoxide alarm. If the carbon monoxide alarm is to beactivated, the detector 50 flashes the light indicator LED2 of thecarbon monoxide indicator circuitry 622 (see FIG. 15) and sounds thecarbon monoxide horn pattern at 800 q. The process then proceeds toblock 800 s as further described below.

[0172] If the carbon monoxide alarm is not to be activated at block 800p, the detector 50 turns off the carbon monoxide LED2 and horn at block800 r, and shows data at block 800 s.

[0173] At block 800 t, the detect or 500 determines whether there areany faults at block 800 t. If there are not any faults at block 800 t,the detector 500 is put in the sleep mode at block 800 w.

[0174] If there are faults, the detector 500 determines whether to checkthe carbon monoxide alarm at block 800 u. If the carbon monoxide is tobe checked, the detector 500 is put in the sleep mode at block 800 w. Ifthere is no problem with the carbon monoxide alarm is not to be checked,the detector 500 generates a trouble chirp at block 800 v and then thedetector is put into the sleep mode at block 800 w.

[0175]FIG. 16 shows a flow diagram of a main program carried out by thedetector 500. At block 810 a, the detector 500 sets a wake-up time(i.e., about 3 seconds for normal mode and about 1.5 seconds for alarmmode). The detector 500 then initializes ports A and B at block 810 band determines whether a TIME OUT bit is cleared at block 810 c. If theTIME OUT bit is cleared, the detector 500 proceeds to a WAKE sub-routineas further described below.

[0176] If the TIME OUT bit is not cleared at block 810 c, the processproceeds to a POWER UP sub-routine as further described below. Thedetector 500 then waits about 300 ms at block 810 d. At block 810 e, thedetector 500 initializes a WAKE UP counter, a SAMPLE counter, and a TESTcounter at block 810 e. The detector 500 then clears one or moreregisters and flags at block 810 f, clears an ALARM REGISTER at block810 g, sets a START flag at block 810 h, and then goes into the sleepmode.

[0177] Referring now to FIG. 17, a WAKE sub-routine 820 is illustrated.The WAKE sub-routine is performed when the processor is awakened fromthe sleep mode.

[0178] At block 820 a, the detector 500 determines whether a TEST MODEflag is set. If the TEST MODE flag is set, the process will proceed to aRESUMET sub-routine 820 b. While carrying out the steps of the RESUMETsub-routine 820 b, the detector 500 is kept STARVED at block 820 c and aWAKEUP counter is set equal to 1 at block 820 d. The detector 500 thendetermines whether the ALARM flag is set at block 820 e. If the ALARMflag is set, the process proceeds to a RESET sub-routine as furtherdescribed below. If the ALARM flag is not set at block 820 e, theprocess proceeds to a LOOP sub-routine as further described below.

[0179] If the TEST MODE flag is not set at block 820 a, the detector 500determines whether an ALARM flag is set at block 820 f. If the ALARMflag is set, the process proceeds to a TESTR sub-routine as furtherdescribed below.

[0180] If the ALARM flag is set at block 820 f, the detector 500determines whether a test switch is pressed at block 820 g. If the testswitch is not pressed, the process proceeds to a BYE1 sub-routine asfurther described below.

[0181] If the test switch is pressed at block 820 g, the detector 500determines whether an error flag is set at block 820 h. If the errorflag is set, the process proceeds to a RESERR sub-routine as furtherdescribed below.

[0182] If the error flag is not set at block 820 h, the detector savesthe data in an ALARM register at block 820 i, sets a TEST flag and setsthe WAKEUP counter equal to 1 at block 820 j. Thereafter, the detector500 turns on the yellow LED1 at block 820 k, waits 100 ms at block 8201,turns off the yellow LED1 at block 820 m, and clears a START flag at 820n. The process will then proceed to a BEEPX sub-routine as furtherdescribed below.

[0183]FIG. 18 illustrates a BY1 sub-routine 840 and the TESTRsub-routine 830. The TESTR sub-routine 830 is utilized to determine ifthe test switch is being pressed during an alarm to silence the unit andthe BYE1 sub-routine is utilized to decrement the WAKEUP counter todetermine what WAKEUP routine to accomplish.

[0184] At block 830 a, the detector 500 determines whether the testswitch is pressed. If the test switch is not pressed, the processproceeds to an ALR1 sub-routine as further described below. If the testswitch is pressed at block 830 a, the detector 500 determines whether aQUIET INHIBIT flag is set at block 830 b. If the QUIET INHIBIT flag isset, the process proceeds to block 830 g as further described below.

[0185] If the QUIET INHIBIT flag is not set at block 830 b, the detector500 sets a 4 minute delay at block 830 c, sets a QUIET ONCE flag atblock 830 d, sets a QUIET flag at block 830 e, turns off the beeper atblock 830 f, waits for a switch release at block 830 g, and thendecrements the WAKEUP counter at block 830 h. The detector 500 thendetermines whether the WAKEUP counter is equal to zero at block 830 i.If the WAKEUP counter is not equal to zero, the detector 500 is put intothe sleep mode.

[0186] If the WAKEUP counter is equal to zero at block 830 i, the WAKEUPcounter is reloaded (i.e., the WAKEUP counter is set to 10 for normalmode and equal to 20 for alarm mode) at block 830 j. At block 830 h, thedetector 500 determines whether the ALARM flag is set. If the ALARM flagis not set, the process proceeds to a LOOP sub-routine as furtherdescribed below.

[0187] If the ALARM flag is set at block 830 h, the detector 500decrements the TEST counter at block 8301, and the process proceeds to aLOOP sub-routine. If the TEST counter is equal to zero at block 830 l,the detector 500 clears the QUIET flag at block 830 m and the processproceeds to the LOOP sub-routine.

[0188] Referring now to FIG. 19, a flow diagram of the ALR1 sub-routine840 is illustrated. The ALR1 sub-routine 840 is utilized to activate thecarbon monoxide LED2 and horn.

[0189] At block 840 a, a TEST ALARM counter is set equal to 2 and anALARM COUNTER is set equal to 3. At block 840 b, the detector determineswhether the QUIET flag is set. If the QUIET flag is set, the processproceeds to block 840 d as further described below.

[0190] If the QUIET flag is not set at block 840 b, the detector 500turns on the horn at block 840 e, turns on the carbon monoxide LED2 atblock 840 d, waits 100 ms at block 840 e, turns off the carbon monoxideLED2 at block 840 f, waits about 400 ms at block 840 g, decrements theALARM counter at block 840 h, and then determines whether the ALARMcounter is equal to zero at block 840 i. If the alarm counter is notequal to zero, the process proceeds to block 840 b.

[0191] If the alarm counter is equal to zero at block 840 i, thedetector 500 turns off the horn at block 840 j and then determineswhether a TEST flag is set at block 840 k. If the TEST flag is set, thedetector 500 decrements the test alarm counter by 1 at block 8401 andthen determines whether the test alarm counter is equal to zero at block840 m.

[0192] If the test alarm counter is equal to zero, the process proceedsto a RESET sub-routine as further described below. If the test alarmcounter is not equal to zero at block 840 m, the detector will be putinto the sleep mode.

[0193] If the TEST flag is set not at block 840 k, the detector 500 willdecrement the WAKEUP counter by 1 at block 840 n and then the detector500 determines whether the WAKEUP counter is equal to zero at block 840o. If the WAKEUP counter is not equal to zero, the detector 500 is putinto the sleep mode.

[0194] If the WAKEUP counter is equal to zero at block 840 o, thedetector 500 reloads the WAKEUP counter with a ALARM DIV value at block840 p. The process then proceeds to a sub-routine MIN4 as furtherdescribed below.

[0195]FIG. 20 illustrates the RESET sub-routine 850 and a RESET1sub-routine 852 of the main routine. At block 850 a, the detector 500restores the ALARM value. The detector 500 then reloads the WAKEUPcounter at block 850 b and then calls CLRREG at block 850 c. The processthen proceeds to ALRH X sub-routine as further described below.

[0196] Referring now to FIG. 21, the LOOP sub-routine 860 isillustrated. The LOOP sub-routine 860 is implemented to determine if amanual self test needs to be performed. At block 860 a, the detector 500calls TIME and then determines whether an ALARM flag is set at block 860b. If the ALARM flag is set, the process proceeds to a LOOP2 sub-routineas further described below.

[0197] If the ALARM flag is not set at block 860 b, the detector 500determines whether the TEST flag is set at block 860 c. If the TEST flagis set, the process proceeds to the LOOP2 sub-routine. If the TEST flagis not set at block 860 c, the detector 500 decrements the TEST counterat block 860 d and then determines whether the TEST counter is equal tozero at block 860 e. If the TEST counter is not equal to zero, theprocess proceeds to the LOOP2 sub-routine. If the TEST counter is equalto zero at block 860 e, the process proceeds to a TEST sub-routine asfurther described below.

[0198]FIG. 22 illustrates a NEG1 sub-routine to a reduction in thecounts value to clear an alarm condition if the CO level is decreasing.At block 870 a, the detector 500 clears a DIRECTION flag and subtracts aREDCT value from the ALARM register at block 870 b. The detector 500then determines whether the ALARM register is negative at block 870 c.If the ALARM is not negative, the process proceeds to block 870 d asfurther described below. If the ALARM is negative at block 870 c, thedetector 500 clears the ALARM register at block 870 e and thendetermines whether the ALARM is less than an ALROFF value at block 870d. If the ALARM register is less than the ALROFF value, the detectorclears the ALARM register at block 870 f.

[0199] If the ALARM register is not less than the ALROFF value at block870 d, the detector 500 decrements a NEGATIVE READING counter at block870 g. If the NEGATIVE READING counter is not equal to zero, the processproceeds to the SHOW sub-routine as further described below. If theNEGATIVE READING counter is equal to zero, the detector 500 calls CLRREGat block 870 h. The process then proceeds to the SHOW sub-routine.

[0200] Referring now to FIG. 23, the TEST sub-routine 880 isillustrated. The TEST sub-routine 880 is utilized to test and exercisethe carbon monoxide sensing electronics, while maintaining the previoussamples and data acquired.

[0201] Initially, the detector 500 clears an ERROR flag at block 880 a,saves all the data at block 880 b, sets up a test current at block 880c, calls TIME1 at block 880 d, and determines whether the sensor outputis less than a BOTLIM value at block 880 e.

[0202] If the sensor output is less than the BOTLIM value, the detector500 sets an ERROR flag at block 880 f, and then the process proceeds toblock 880 g as further described below. If the sensor output is not lessthan the BOTLIM value at block 880 e, the detector 500 determineswhether the sensor output is less than a TOPLIM value at block 880 h.

[0203] If the sensor output is less than the TOPLIM value, the detector500 sets an ERROR flag at block 880 f, and the process proceeds to block880 g. If the sensor output is not less than the TOPLIM value at block880 h, the detector 500 determines whether the ALARM register is equalto zero at block 880 g.

[0204] If the ALARM register is not equal to zero at block 880 g, thedetector 500 subtracts a REDMIN register from the ALARM register atblock 880 i, and then determines whether the ALARM register is negativeat block 880 j. If the ALARM register is not negative, the processproceed to block 8801 as further described below. If the ALARM registeris negative at block 880 j, the detector 500 sets the ALARM registerequal to zero at block 880 k and then the process proceeds to block 8801as further described below.

[0205] If the ALARM register is equal to zero at block 880 g, thedetector 500 will restore the save data at block 8801. The detector 500will then initialize the WAKEUP counter and restore the TEST counter atblock 880 m. The process then proceeds to the BAT1 sub-routine asfurther described below.

[0206]FIG. 24 illustrates the BAT1 sub-routine 890 and a Loop2sub-routine 900. The BAT1 sub-routine 890 determines whether the batteryof the detector 500 is at a sufficient voltage level and the LOOP2sub-routine turns off the IR LED and power LED after a sample has beentaken and stores the current sample value.

[0207] The detector 500 turns on the IR LED of the carbon monoxidesensor at block 890 a and decrements a ALARM TOGGLE register at block890 b. If the ALARM TOGGLE is equal to zero at block 890 b, the detectoris put into the sleep mode with their LED on. If the ALARM TOGGLE is notequal to zero at block 890 b, the detector 500 clears a LOW BATTERY flagat block 890 c, turns on the red LED2 at block 890 d, waits about 10 msat block 890 e, and then determines whether the battery line is at a lowlevel at block 890 f.

[0208] If the battery line is not at a low voltage level, the processproceeds to block 890 g as further described below. If the battery lineis at a low level at block 890 f, the detector 500 sets a LOW BATTERYflag at block 890 h, turns off their LED at block 890 g, turns off thered LED at block 890 i, and then determines whether a START flag hasbeen set at block 890 k.

[0209] If the START flag is not set, the process proceeds to a INSPECTsub-routine as further described below. If the START flag is set atblock 890 k, the detector unit 500 copies a current sample to a lastsample buffer at block 890 l, clears the START flag at block 890 m, andthen the process proceeds to the INSPECT sub-routine.

[0210]FIG. 25 illustrates the INSPECT sub-routine 910. The INSPECTsub-routine 910 is utilized to evaluate the difference between theprevious sample and the present sample.

[0211] At block 910 a, the detector 500 determines whether a HIGH BYTEis greater than an HFAULT value. If the HIGH BYTE is not greater thanthe HFAULT value, the process proceeds to block 910 b as furtherdescribed below. If the HIGH BYTE is greater than the HFAULT value atblock 910 a, the detector 500 sets an ERROR flag at block 910 c and thendetermines whether the HIGH BYTE is greater than a HIVAL1 value at block910 b.

[0212] If the HIGH BYTE is greater than the HIVAL1 value, the processproceeds to block 910 e as further described below. If the HIGH BYTE isnot greater than the HIVAL1 value at block 910 b, the detector 500 setsthe ERROR flag at block 910 d, saves a previous sample in registers Aand B at block 910 e, and then determines whether the TEST flag is setat block 910 f.

[0213] If the TEST flag is set, the process proceeds to block 910 g asfurther described below. If the TEST flag is not set at block 910 f, thedetector 500 moves the current sample to the last sample register atblock 910 h, calculates the difference between the current sample andthe last sample at block 910 g, and then determines whether thedifference is negative at block 910 i.

[0214] If the difference is negative, the process proceeds to the NEG1sub-routine as described above. If the difference is not negative atblock 910 i, the process proceeds to a POS1 sub-routine as etherdescribed below.

[0215]FIG. 26 illustrates the POS1 sub-routine 920 to determine if weare in a high level alarm and a ACC3 sub-routine 922 to add the equatefor the previous sample to the alarm register. At block 920 a, thedetector 500 determines whether a HIGH BYTE is equal to zero. If theHIGH BYTE is not equal to zero, the process proceeds to a ADJ1sub-routine 924 as further described below. If the HIGH BYTE is equal tozero, the detector 500 determines whether a LOW BYTE is equal to zero atblock 920 b.

[0216] If the LOW BYTE is not equal to zero, the detector 500 sets aDIRECTION flag at block 920 c and the process proceeds to block 920 d asfurther described below. If the LOW BYTE is equal to zero at block 920b, the detector 500 determines whether the LOW BYTE is greater than aSUPRL value at block 920 d.

[0217] If the LOW BYTE is greater than the SUPRL value, the processproceeds to the ADJ1 sub-routine 924 as further described below. If theLOW BYTE is not greater than SUPRL at block 920 d, the detector 500assigns the difference to the current sample register at block 920 e,decrements a sample register pointer and reloads the register pointer tofive when the sample register pointer is equal to zero at block 920 f.The detector 500 adds the five sample registers and stores the result ina SUMREG register at block 920 g. The process then proceeds to a ACCUMsub-routine as further described below.

[0218] During the ACC3 sub-routine 922, the detector 500 adds thedifference to the ALARM register at block 922 a, and then determineswhether the ALARM register exceeds 255 at block 922 b. If the ALARMregister does not exceed 255, the process proceeds to a CHKRDHsub-routine as further described below. If the ALARM register exceeds255 at block 922 b, the process proceeds to the ADJ1 sub-routine 924.

[0219] During the ADJ1 sub-routine 924, the detector unit 500 determineswhether the ALARM is equal to 255 and sets an ALARM flag at block 924 a.The detector 500 then sets up an ALARM TOGGLE at block 924 b anddetermines whether the QUIET flag is set at block 924 c.

[0220] If the QUIET flag is set, the process proceeds to the SHOWsub-routine as further described below. If the QUIET flag is not set atblock 924 c, the detector 500 determines whether the TEST flag is set atblock 924 d.

[0221] If the TEST flag is not set, the process proceeds to the SHOWsub-routine. If the TEST flag is set at block 924 d, the detector 500turns on the red LED and turns on the beeper at block 924 e. The processthen proceeds to the SHOW sub-routine.

[0222]FIG. 27 illustrates the ACCUM sub-routine 930 and a SET6sub-routine. The ACCUM sub-routine 930 is utilized to determine whatvalue to assign to the lower byte of the sum register, and the SET6sub-routine is implemented to assign the sum 6 value to the low byte ofthe sum register.

[0223] At block 930 a, the detector 500 obtains a SUMREGL value and thendetermines whether a TEST flag is set at block 930 b. If the TEST flagis set, the process proceeds to a ACC4 sub-routine as further describedbelow. If the TEST flag is not set at block 930 b, the detector unit 500determines whether a DIRECTION flag is set at block 930 c.

[0224] If the DIRECTION flag is not set, the process proceeds to block930 d as further described below. If the DIRECTION flag is set at block930 c, the detector unit 500 determines if an ALARM flag is set at block930 e.

[0225] If the ALARM flag is not set, the process proceeds to block 930d. If the ALARM flag is set at block 930 e, the detector 500 reloads theNEGATIVE counter at block 930 f.

[0226] At block 930 d, the detector 500 determines whether a SUMREGHvalue is equal to zero. If the SUMREGH value is not equal to zero, theprocess proceeds to a SET6 sub-routine 930. If the SUMREGH is equal tozero at block 930 d, the detector unit 500 determines whether theSUMREGL value is equal to zero at block 930 g.

[0227] If the SUMREGL value is equal to zero, the process proceeds to aCHKSP sub-routine as further described below. If the SUMREGL is notequal to zero at block 930 g, the detector 500 determines whether a LOWTEMP flag is set at block 930 h.

[0228] If the LOW TEMP flag is set at block 930 h, the detector 500determines whether the SUMREGL value is less than 3 at block 930 i. Ifthe SUMREGL value is less than three, the detector 500 sets the SUMREGLvalue equal to three at block 930 j, and will times the SUMREGL by twoat block 930 k, and the process proceeds to block 9301. If the SUMREGLis not less than 3 at block 930 i, the detector unit 500 times theSUMREGL by two at block 930 k, and the process proceeds to block 930 l.

[0229] Now, the detector unit 500 compares the SUMREGL to LEVEL1 throughLEVEL5 values. If the SUMREGL is less than the LEVEL1 value, thedetector unit 500 sets the SUMREGL value equal to a SUM1 value at block930 m. If the SUMREGL value is less than the LEVEL2 value at block 930n, the detector 500 sets the SUMREGL value equal to a SUM2 value atblock 930 o. If the SUMREGL value is less than the LEVEL3 value at block930 p, the detector 500 sets SUMREGL value equal to a SUM3 value atblock 930 q. If the SUMREGL value is less than the LEVEL4 value at block930 r, the detector 500 sets the SUMREGL value equal to a SUM4 value atblock 930 t. If the SUMREGL value is less than a LEVEL5 value at block930 v, the detector 500 sets the SUMREGL value equal to a SUM5 value atblock 930 w.

[0230] If the detector 500 has set the SUMREGL value equal to the SUM1value, SUM2 value, the SUM3 value, the SUM4 value, or the SUM5, valuethe process proceeds to the ACC3 sub-routine as further described below.If the SUMREGL is not set to one of these values, the process proceedsto the SET6 sub-routine 930. Subsequently, the detector 500 sets theSUMREGL equal to SUM6 at block 930 a. The process then proceeds to theACC3 sub-routine as further described below.

[0231]FIG. 28 illustrates the CHKSP sub-routine 940 and CHKRDHsub-routine 950. The CHKSP sub-routine 940 is utilized to check if thepresent sample is at a flat level or if it has changed direction fromthe previous sample.

[0232] At block 940 a, the detector unit 500 determines whether aDIRECTION flag is set. If the DIRECTION flag is not set, the processproceeds to the CHKRDH sub-routine 950. If the DIRECTION flag is set atblock 940 a, the detector 500 determines whether a ALARM counter isgreater than a FLATLVL value at block 940 b.

[0233] If the ALARM counter is not greater than the FLATLVL counter, theprocess proceeds to the CHKRDH sub-routine 950. If the ALARM counter isgreater than the FLATLVL value at block 940 b, the detector 500 adds theFLATLVL value to a SUMREG register at block 940 g, and the processproceeds to an ACC3 sub-routine as further described below.

[0234] The CHKRDH sub-routine 950 is utilized to determine the status ofthe sensor high flag. At block 950 a, the detector determines whether aSENSOR HIGH flag is set at block 950 a. If the SENSOR HIGH flag is notset, the process proceeds to the SHOW sub-routine as further describedbelow. If the SENSOR HIGH flag is set at block 950 a, the processproceeds to a ADJ1 sub-routine as further described below.

[0235]FIG. 29 illustrates a flow diagram of the SHOW sub-routine 960 anda NOSHOW sub-routine 965. The SHOW sub-routine 960 is utilized topresent the data stream through RS-237 communication to peripherals andthe power LED.

[0236] At block 960 a, the detector 500 determines whether an EOL lineis at a low level. If the EOL line is at a low level, the processproceeds to a NOSHOW sub-routine 965 as described below. If the EOL lineis not at a low level at block 960 a, the detector 500 switches a SERIALline to an output at block 960 b.

[0237] At block 960 c, the detector 500 clears a SYNC bit, waits for apredetermined amount of time, and sets the SYNC bit. The detector 500then sets an REGC register equal to the last register plus 1 at block960 d, decrements the REGC register at block 960 e, and then determineswhether the REGC register is equal to zero at block 960 f.

[0238] If the REGC register is not equal to zero, the detector obtainsthe data pointed to by the REGC register and then the process proceedsto an XMITR sub-routine as further described below. If the REGC is equalto zero at block 960 f, the process proceeds to the NOSHOW sub-routine965.

[0239] The NOSHOW sub-routine 965 is utilized to determine if there is alow battery, error or power up flag set and sound the correct hornpattern. At block 965 a, the detector 500 determines whether an ALARMflag is set. If the ALARM flag is set, the process proceeds to block 965b as further described below. If the ALARM flag is not set at block 965a, the detector 500 determines whether an ERROR flag is set at block 965c.

[0240] If the ERROR flag is set, the detector 500 issues a double beepat block 965 d, and the process proceeds to block 965 b as furtherdescribed below. If the ERROR flag is not set at block 965 c, thedetector unit determines whether a LOW BATTERY flag is set at block 965e.

[0241] If the LOW BATTERY flag is set, the detector 500 issues a singlebeep at block 965 f. If the LOW BATTERY flag is not set at block 965 e,the detector determines whether a START flag is set at block 965 g.

[0242] If the START flag is set, the detector 500 issues a welcomewake-up chirp at block 965 h. If the START flag is not set at block 965g, the detector 500 clears the START flag at block 965 b and thedetector 500 is put into the sleep mode.

[0243]FIG. 30 illustrates the XMITR sub-routine 970 to synchronize thedata stream. At block 970 a, a REGC register is loaded with 8. Thedetector 500 then rotates the value of a REGA register into a CARRY bitat block 970 b and then determines whether the CARRY bit is set a block970 c.

[0244] If the CARRY bit is set, the process proceeds to block 970 d asfurther described below. If the CARRY bit is not set at block 970 c, thedetector 500 sets a TRANSMIT bit a block 970 e and then determineswhether the CARRY bit is cleared at block 970 d.

[0245] If the CARRY bit is cleared, the process proceeds to block 970 fas further described below. If the CARRY bit is not cleared at block 970d, the detector 500 clears the TRANSMIT bit a block 970 g, waits apredetermined amount of time at block 970 f, clears a SYNC bit at block970 h, waits another predetermined amount of time at block 970 i, setsthe SYNC bit at block 970 j, and decrements a REGC register at block 970k. The process then proceeds to block 970 b unless the REGC register isequal to zero. If the REGC register is equal to zero at block 970 k, thedetector 500 sets the TRANSMIT bit at block 9701, and byte has beensent, continue.

[0246]FIG. 31 illustrates the TIME sub-routine 975 and the TIME1sub-routine 977. The TIME and TIME1 sub-routines are utilized to take acarbon monoxide sample.

[0247] At block 975 a, the detector unit 500 turns on the IR LED, sets aTRIS register to remove capacitor discharge, removes test currentsource, and enables the photo diode power source. At block 975 b, thedetector 500 clears the time counters, a RTCC bit, and an OVERFLOW flag.The detector 500 then increments the time counters at block 975 c, andthen determines whether the time counter equals an overflow value atblock 975 d.

[0248] If the time counter is equal to the overflow value, the detector500 sets an overflow flag and sets counters to FFFF at block 975 e. Theprocess then proceeds to block 975 g as further described below. If thetime counter is not equal to the overflow value at block 975 d, thedetector 500 determines whether the RTCC should be incremented at block975 f.

[0249] If the RTCC should not be incremented, the process proceeds toblock 975 c. If the RTCC is to be incremented at block 975 f, thedetector 500 will turn off the IR LED, disable the photo diode powersource, and restore the capacitor discharge at block 975 g. The processthen will proceed to the beginning of the TIME sub-routine 975 or TIME1sub-routine 977.

[0250]FIG. 32 illustrates a DEL001 sub-routine 980. The DEL001sub-routine 980 is utilized as a fixed time delay for themicrocontroller timing. At block 980 a, the detector 500 loads a REGBregister with 71H, NOP at block 980 b, decrements the REGB register atblock 980 c, and then determines whether the REGB register is equal tozero at block 980 d.

[0251] The process will proceed to block 980 b unless the REGB registeris equal to zero. When the REGB register 13 is equal to zero, theprocess will return to the beginning of the DEL001 sub-routine 980.

[0252]FIG. 33 illustrates a DEL255 sub-routine 982 and a DELPROGsub-routine 984 for a fixed timing delay on the microcontroller. Atblock 982 a, the detector 500 loads a TEMP register with FFh. Thedetector 500 then calls DEL001 at block 982 b, decrements the TEMPregister at block 982 c, and then determines whether the TEMP registeris equal to zero at block 982 d.

[0253] The process proceeds to block 982 b unless the TEMP register isequal to zero. When the TEMP register is equal to zero, the processreturns to the beginning of thee DEL255 sub-routine 982 or the DELPROGsub-routine 984.

[0254]FIG. 34 illustrates a CLRREG sub-routine 986. The CLRREGsub-routine 986 is utilized to reset the microcontroller at power-up,and ensure LED's and horn are off.

[0255] As shown in FIG. 34, the detector 500 clears one or more SAMPLEregisters at block 986 a, clears one or more flags at block 986 b, setsa START flag at block 986 c, and clears Port B at block 986 d. Thedetector 500 then turns off the red LED2 and yellow LED1 at block 986 e.The process then returns to the beginning of the CLRREG sub-routine 986.

[0256]FIG. 35 shows a M16 sub-routine 988 to add the determined weightto the low byte of the sum register. At block 988 a, the detector 500adds W to the SUMREGL register. The detector 500 then determines whethera CARRIER register is set at block 988 b.

[0257] If the CARRIER register is not set, the process returns to thebeginning of the M16 sub-routine 988. If the CARRIER register is set atblock 988 b, the detector 500 increments the SUMREG register at block988 c and then the process returns to the beginning of the M16sub-routine 988.

[0258] Although the present invention has been described in detail byway of illustration and example, it should be understood that a widerange of changes and modifications can be made to the preferredembodiments described above without departing in any way from the scopeand spirit of the invention. Thus, the described embodiments are to beconsidered in all respects only as illustrative and not restrictive, andthe scope of the invention is, therefore, indicated by the appendedclaims rather than the foregoing description. All changes that comewithin the meaning and range of equivalency of the claims are to beembraced within their scope.

What is claimed:
 1. A self-contained, combined, gas and smoke detectorcomprising: a gas sensor; a smoke sensor; a programmed control elementcoupled to both of the sensors; a housing which defines an internalregion for receiving the sensors and the control element wherein thehousing is perforated with a first opening shaped as a fire; and aremovable protective planar element, covering at least a part of the gassensor within the housing wherein the element is applied duringmanufacture and is removed once the detector has been placed intoservice.
 2. A detector as in claim 1 which includes a light emittingelement positioned adjacent to the first opening wherein the lightemitting element is energized in the presence of smoke therebyilluminating the fire shaped opening.
 3. A detector as in claim 1wherein the housing is perforated with a second opening shaped unlikethe first opening and including a second light emitting elementpositioned adjacent thereto, wherein the second light emitting elementis energized in response to the presence of gas thereby illuminating thesecond opening.
 4. A detector as in claim 1 wherein the housing has aperimeter formed of a plurality of intersecting planar sides wherein atleast some of the sides intersect at angles in excess of ninety degrees.5. A detector as in claim 1 wherein the housing has a perimeter that isnon-circular and which carries an elongated, movable test initiatingmember.
 6. A detector as in claim 1 wherein the control element includesexecutable instructions for selecting between first and seconddifferent, pre-stored fire alarm indicating horn patterns.
 7. A detectoras in claim 6 wherein the control element includes executableinstructions for automatically testing the sensors.
 8. An apparatuscomprising: a gas sensor; a smoke sensor; control circuitry including aprogrammed processor coupled to the sensors, the control circuitrydetermining if a predetermined gas condition has been sensed, thecontrol circuitry also determining if a predetermined smoke conditionhas been sensed wherein the processor stores at least first and secondnon-verbal alarm specifying horn patterns; and an alarm energizable toproduce the first pattern when the gas condition is present, and toproduce the second pattern in the presence of the predetermined smokecondition.
 9. The apparatus of claim 8 wherein the gas sensor includes abiomimetic material that responds to the presence of carbon monoxide.10. An ambient condition detector comprising: an ambient conditionsensor; a control circuit, coupled to the sensor, which includes aprocessor programmed with a plurality of executable instructions and atleast two pre-stored, different alarm specifying, non-verbal outputpatterns both associated with the same sensed ambient condition whereinsome of the instructions, in response to the sensed alarm condition,select one of the two pre-stored alarm specifying patterns for output.11. A detector as in claim 10 which includes a second, different ambientcondition sensor coupled to the control circuit.
 12. A detector as inclaim 11 which includes a third, pre-stored, alarm specifying,non-verbal output pattern associated with the second sensor.
 13. Adetector as in claim 12 which includes instructions for establishing thepresence of an alarm condition associated with the second sensor and foraudibly generating the third alarm specifying output pattern.
 14. Adetector as in claim 13 which includes instructions for automaticallycarrying out a test of each of the sensors.
 15. A detector as in claim13 which includes circuitry for evaluating at least one internal statuscondition and, responsive thereto, for generating an audible indicationthereof.
 16. A detector as in claim 15 which includes a power supply andthe circuitry evaluates an electrical parameter of the supply.
 17. Adetector as in claim 16 wherein the supply comprises a battery and theelectrical parameter comprises a battery output voltage.
 18. A detectoras in claim 15 which includes a planar cover member removably attachedto the gas sensor and removable when the detector is placed into serviceto expose the sensor to ambient airborne gas.
 19. A detector as in claim18 wherein the first sensor comprises a smoke sensor and the second asensor comprises a gas sensor.
 20. A detector as in claim 13 whichincludes instructions for automatically carrying out a test of each ofthe sensors.
 21. A detector comprising: a housing which defines aninternal region; a user non-replacable biomemetic-type gas sensorcarried in the region wherein during manufacture, the gas sensor issealed with a user removable planar sealing tape which is located atleast in part in the internal region; a fire sensor carried in theregion; a programmed processor carried in the region, coupled to thesensors; and instructions executable by the processor for automaticallyand periodically testing the sensors.